package com.kmproject.haifu.mvp.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kmproject.haifu.R;
import com.kmproject.haifu.mvp.model.entity.beans.HouseRentListShowBean;

import java.util.List;

public class HouseRentingShowHeZuYqItemAdapter extends BaseQuickAdapter<HouseRentListShowBean.DetailsBean,BaseViewHolder> {
    public HouseRentingShowHeZuYqItemAdapter( @Nullable List<HouseRentListShowBean.DetailsBean> data) {
        super(R.layout.houserenting_show_hezu_yq_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HouseRentListShowBean.DetailsBean item) {
      helper.<TextView>getView(R.id.houserenting_show_hezu_yq_item_txt).setText(item.getBaseDictName());
//      if (item.getBaseDictName().contains("整套")||item.getBaseDictName().contains("独立")||item.getBaseDictName().contains("独栋")||item.getBaseDictName().contains("游泳"))
        if (item.getBaseDictName().contains("整套"))
        {
          helper.<TextView>getView(R.id.houserenting_show_hezu_yq_item_txt).setBackgroundResource(R.drawable.button_yellow_10_bg);
      }
    }
}
